import {Column, Entity, PrimaryGeneratedColumn} from 'typeorm';

@Entity()
export class Category {
    @PrimaryGeneratedColumn()
    id: number;

    @Column({type: 'varchar', name: 'name', default: ''})
    name: string;

    @Column({type: 'int', name: 'sort', default: 1})
    sort: number;

    @Column({type: 'varchar', name: 'icon', default: ''})
    icon: number;

    @Column({type: 'varchar', name: 'description', default: ''})
    description: number;

    @Column()
    create_time: Date;

    @Column()
    updated_time: Date;
}
